﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEngine;

namespace SLUISystem
{
    public class EditorWindowConfig
    {
        public static float ToolBarHeight = 18;
        public static float PropertyBoxWidth = 320;
        public static float EditorWindowTabHeight=21;
        public static float ScrollBarSize = 15;

        public static GUIStyle PropertyBoxGUIStyle
        {
            get
            {
                GUIStyle guiStyle = new GUIStyle();
                guiStyle.padding = (new RectOffset(2, 2, 0, 0));
                return guiStyle;
            }
        }

        public static GUIStyle GraphBackgroundGUIStyle
        {
            get
            {
                GUIStyle guiStyle = new GUIStyle();
                Texture2D texture2D = new Texture2D(1, 1);
                if (EditorGUIUtility.isProSkin)
                {
                    texture2D.SetPixel(1, 1, new Color(0.1333f, 0.1333f, 0.1333f));
                }
                else
                {
                    texture2D.SetPixel(1, 1, new Color(0.3647f, 0.3647f, 0.3647f));
                }
                texture2D.hideFlags = HideFlags.HideInHierarchy | HideFlags.NotEditable | HideFlags.DontSaveInEditor;
                texture2D.Apply();
                guiStyle = new GUIStyle(GUI.skin.box);
                guiStyle.normal.background = (texture2D);
                guiStyle.active.background = (texture2D);
                guiStyle.hover.background = (texture2D);
                guiStyle.focused.background = (texture2D);
                guiStyle.normal.textColor = (Color.white);
                guiStyle.active.textColor = (Color.white);
                guiStyle.hover.textColor = (Color.white);
                guiStyle.focused.textColor = (Color.white);
                return guiStyle;
            }
        }

    }
}
